#include <linux/module.h>
#include <linux/init.h>

MODULE_LICENSE ("GPL");

int irq = 10;
char *str = "andy";
int fish[10] = {0};
int num = ARRAY_SIZE(fish); //10

module_param (irq, int, 0644);
module_param (str, charp, 0);
module_param_array (fish, int, &num, 0644);

int __init module_param_init (void)
{
	int i = 0;
	printk ("irq = %d\n", irq);
	printk ("str = %s\n", str);
	for (; i < num; i++){
		printk ("fish[%d] = %d\n", i, fish[i]);
	}
	return 0;
}
void __exit module_param_exit (void)
{
	int i = 0;
	printk ("irq = %d\n", irq);
	printk ("str = %s\n", str);
	for (; i < num; i++){
		printk ("fish[%d] = %d\n", i, fish[i]);
	}
	return ;
}
module_init (module_param_init);
module_exit (module_param_exit);
